package test.synchronize;

/**
 * Created by linshuo on 2018/4/13.
 */
public class ObjectLock {

    public synchronized void play() {
        try {
            System.out.println("1");
            Thread.sleep(500);
            System.out.println("2");
            Thread.sleep(500);
            System.out.println("3");
            Thread.sleep(500);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
